package com.topnav.mc.alarm.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.topnav.mc.base.CommServiceImpl;
import com.topnav.mc.alarm.dao.mapper.AlarmInfoMapper;
import com.topnav.mc.alarm.entity.AlarmInfo;
import com.topnav.mc.alarm.service.IAlarmInfoService;
import org.springframework.stereotype.Service;

@Service
public class AlarmInfoServiceImpl extends CommServiceImpl<AlarmInfoMapper, AlarmInfo> implements IAlarmInfoService {
    @Override
    public <E extends IPage<AlarmInfo>> E searchAlarm(E page, AlarmInfo param) {
        Page<AlarmInfo> page1 = new Page<AlarmInfo>(page.getCurrent(),page.getSize());
        IPage<AlarmInfo> resultPage = getBaseMapper().searchAlarm(page1, param);

        return (E) resultPage;
    }
}
